﻿using UnityEngine;
using System.Collections;

public class labelShare : MonoBehaviour {
    public GUIStyle myStyleLabel;
    public HSController controller;
    public int alignX;
    public int alignY;
	
    // Use this for initialization
    void Start() {}

    // Update is called once per frame
    void Update() {}

    void OnGUI()
    {
        AutoResize(480, 320);

       // GUI.Label(new Rect(alignX, alignY, 10, 10), "Jaa tulos FB:ssä");
        //GUI.Label(new Rect(alignX, alignSecondY, 200, 20), "Highscore:" + highscore, myStyleLabel);
        //stringToEdit = GUI.TextField(new Rect(10, 10, 200, 20), stringToEdit, 25);
        //if (GUI.Button(new Rect(alignFirstX, alignFirstY, width, height), "Play Again", myStyleButton))
        //{
        //    Application.LoadLevel("Spaceship");
        //}
        //if (GUI.Button(new Rect(alignFirstX, alignSecondY, width, height), "Menu", myStyleButton))
        //{
        //    Application.LoadLevel("Menu");
        //}
        //if (GUI.Button(new Rect(alignFirstX, alignThirdY, width, height), "Share", myStyleButton))
        //{
        //    StartCoroutine(controller.PostScores("Matti",PlayerPrefs.GetInt("Score")));
        //}
    }
	
    public static void AutoResize(int screenWidth, int screenHeight)
    {
        Vector2 resizeRatio = new Vector2((float)Screen.width / screenWidth, (float)Screen.height / screenHeight);
        GUI.matrix = Matrix4x4.TRS(Vector3.zero, Quaternion.identity, new Vector3(resizeRatio.x, resizeRatio.y, 1.0f));
    }
}
